package com.firewolf.fr.s007_function;

import java.io.OutputStreamWriter;
import java.io.Writer;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

import com.firewolf.fr.utils.FreeMarkerUtil;

import freemarker.template.Template;

public class Function {
	public static void main(String[] args) throws Exception {
		Template tl = FreeMarkerUtil.getTemplate("007_function.ftl");
		Writer w = new OutputStreamWriter(System.out);// 把数据显示到控制台
		Map<String, Object> map = new HashMap<>();
		map.put("now", new Date());
		tl.process(map, w);
		w.flush();
	}
}
